export function set(data) {
  let sceneId = window.sessionStorage.getItem('sceneId')
  let tableName = 'tile-' + sceneId
  const param = getBySceneId()
  param[data.id] = data
  window.localStorage.setItem(tableName, JSON.stringify(param))
}

export function get(id) {
  const param = getBySceneId()
  return param[id] || {}
}

export function getBySceneId() {
  let sceneId = window.sessionStorage.getItem('sceneId')
  let tableName = 'tile-' + sceneId
  const paramJson = window.localStorage.getItem(tableName)
  return paramJson ? JSON.parse(paramJson) : {}
}